package com.sailfish.springbootdemo.controller.db7;

import com.sailfish.springbootdemo.pojo.Result;
import com.sailfish.springbootdemo.service.db7.TbFlowProcessMainService;
import com.sailfish.springbootdemo.service.db7.TbTemplateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
@RequestMapping("/TbFlowProcess")
public class TbFlowProcessController {

    @Autowired
    private TbFlowProcessMainService tbFlowProcessMainService;



    @RequestMapping("/getAllTask")
    public Result getAllTask(@RequestBody String data) {

        return tbFlowProcessMainService.getAllTask(data);
    }

    @RequestMapping("/getMyTask")
    public Result getMyTask(@RequestBody String data) {
        return tbFlowProcessMainService.getMyTask(data);
    }


    @RequestMapping("/approveFlow")
    public Result approveFlow(@RequestBody String data) {

        return tbFlowProcessMainService.approveFlow(data);
    }

    @RequestMapping("/getFlowProcessRecords")
    public Result getFlowProcessRecords(@RequestBody String data) {

        return tbFlowProcessMainService.getFlowProcessRecords(data);
    }

}
